#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv) {
	char *ignoreEnv = getenv("IGNORE_BACKSLASH");
	char cback = ((ignoreEnv == NULL) || strcmp(ignoreEnv, "1"));
	// printf("arc=%d %s\n", argc, argv[0]);
	char cmd[2000];
	if (argc <= 2) {
		return 0;
	}
	int i = 2;
	cmd[0] = '\0';
	do {
		char *narg = argv[i];
		if (cback) {
			char *p = strchr(narg, '\\');
			for (;(p = strchr(narg, '\\')) != NULL;) {
				*p = '/';
			}
		}
		strcat(cmd, argv[i]);
		strcat(cmd, " ");
	} while (++i < argc);
	// printf("cmd=%s\n", cmd);
	int err = system(cmd);
	exit(err);
}
